/*
 * @Author: Mark
 * @Date: 2018-09-17 11:21:02
 * @LastEditors: Mark
 * @LastEditTime: 2019-01-30 17:28:34
 * @Description: vue项目js入口文件
 */

/**
 * 引入第三方的模块
 */
import Vue from 'vue'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import 'font-awesome/css/font-awesome.css'
import Echarts from 'echarts'
import VueLazyload from 'vue-lazyload'
import CKEditor from '@ckeditor/ckeditor5-vue';

/**
 * 引入自定义的模块
 */
import App from './App'
import router from './router'
import resUtil from './utils/requestUtil'
import uriConf from './config/UserURLConfig'

/**
 * 
 */
router.beforeEach((to,from,next)=>{
  if(to.meta.title){
    document.title = to.meta.title
  }
  next()
})

/**
 * vue属性的全局配置
 */
Vue.use(ElementUI)
Vue.use(Echarts)
Vue.use( CKEditor );
Vue.use(VueLazyload,{
  preLoad : 1.3,
  loading: require('./assets/images/loading.gif'),
  attempt: 1
})
Vue.config.productionTip = false
Vue.prototype.$uriConf = uriConf
Vue.prototype.$resUtil = resUtil
Vue.prototype.$echarts= Echarts

new Vue({
  el: '#app',
  router,
  components: { App },
  template: '<App/>'
})
